package org.songwang.org.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.songwang.basic.domain.BaseDomain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class Department extends BaseDomain implements Serializable {
    private String sn; //部门编号
    private String name;//部门名称
    private String dirPath;//部门的上级分类层级id
    private Integer state;//部门状态，0正常，1禁用
    private Long manager_id;//部门管理员，关联Employee表id
    private Employee manager;
    private Long parent_id;//上级部门
    private Department parent;

    //新增部门集合 - 当前部门的儿子
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    List<Department> children = new ArrayList<>();

}
